package net.weamor.spring.aop;


import org.springframework.aop.AfterReturningAdvice;
import org.springframework.aop.MethodBeforeAdvice;

import java.lang.reflect.Method;

/**
 * Created by liaogd on 2015/11/8.
 */
public class SleepHelper implements MethodBeforeAdvice,AfterReturningAdvice {


    @Override
    public void afterReturning(Object o, Method method, Object[] objects, Object o1) throws Throwable {

        System.out.println(" sleep 后置拦截器...");

    }

    @Override
    public void before(Method method, Object[] objects, Object o) throws Throwable {

        System.out.println(" sleep 前置拦截器...");
    }
}
